<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>lagou</title>

    <script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("button").click(function () {
                $.ajax("http://192.168.1.105:8080/placeOrder?userId=1&goodId=2", {
                    type: "GET",//请求方式
                    //contentType:"utf-8",发送请求的编码方式
                    success: function (data) {//请求成功后调用的函数
                        alert("下单成功");
                    },
                    error: function (textStatus) {//请求失败后调用的函数
                        alert("手慢了");
                    }
                })
            });
        });
    </script>

</head>
<body>

<button action="seckill">秒杀</button>

</body>
</html>